Micron Document
`:top
In physics, and more specifically in `F33f`_`[Hamiltonian mechanics`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Hamiltonian_mechanics]`_`f, a `!generating function`! is, loosely, a function whose partial derivatives generate the differential equations that determine a system's dynamics. Common examples are the `F33f`_`[partition function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Partition_function_(statistical_mechanics)]`_`f of `F33f`_`[statistical mechanics`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Statistical_mechanics]`_`f, the Hamiltonian, and the function which acts as a bridge between two sets of canonical variables when performing a `F33f`_`[canonical transformation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Canonical_transformation]`_`f.

>>Contents

• `F0af`_`[In canonical transformations`#in-canonical-transformations]`_`f
• `F0af`_`[Example`#example]`_`f
• `F0af`_`[See also`#see-also]`_`f
• `F0af`_`[References`#references]`_`f

-─

>>In canonical transformations

There are four basic generating functions, summarized by the following table:`:cite-ref-1[`F5bf`_`[1`#cite-note-1]`_`f]

`t
| Generating function | Its derivatives |
|---|---|
| F = F 1 ( q , Q , t ) {\\displaystyle F=F_{1}(q,Q,t)} | p = ∂ F 1 ∂ q {\\displaystyle p=~~{\\frac {\\partial F_{1}}{\\partial q}}\\,\\!} and P = − ∂ F 1 ∂ Q {\\displaystyle P=-{\\frac {\\partial F_{1}}{\\partial Q}}\\,\\!} |
| F = F 2 ( q , P , t ) = F 1 + Q P {\\displaystyle {\\begin{aligned}F&=F_{2}(q,P,t)\\\\&=F_{1}+QP\\end{aligned}}} | p = ∂ F 2 ∂ q {\\displaystyle p=~~{\\frac {\\partial F_{2}}{\\partial q}}\\,\\!} and Q = ∂ F 2 ∂ P {\\displaystyle Q=~~{\\frac {\\partial F_{2}}{\\partial P}}\\,\\!} |
| F = F 3 ( p , Q , t ) = F 1 − q p {\\displaystyle {\\begin{aligned}F&=F_{3}(p,Q,t)\\\\&=F_{1}-qp\\end{aligned}}} | q = − ∂ F 3 ∂ p {\\displaystyle q=-{\\frac {\\partial F_{3}}{\\partial p}}\\,\\!} and P = − ∂ F 3 ∂ Q {\\displaystyle P=-{\\frac {\\partial F_{3}}{\\partial Q}}\\,\\!} |
| F = F 4 ( p , P , t ) = F 1 − q p + Q P {\\displaystyle {\\begin{aligned}F&=F_{4}(p,P,t)\\\\&=F_{1}-qp+QP\\end{aligned}}} | q = − ∂ F 4 ∂ p {\\displaystyle q=-{\\frac {\\partial F_{4}}{\\partial p}}\\,\\!} and Q = ∂ F 4 ∂ P {\\displaystyle Q=~~{\\frac {\\partial F_{4}}{\\partial P}}\\,\\!} |
`t

>>Example

Sometimes a given Hamiltonian can be turned into one that looks like the `F33f`_`[harmonic oscillator`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Harmonic_oscillator]`_`f Hamiltonian, which is

H = a P 2 + b Q 2 . {\\displaystyle H=aP^{2}+bQ^{2}.}

For example, with the Hamiltonian

H = 1 2 q 2 + p 2 q 4 2 , {\\displaystyle H={\\frac {1}{2q^{2}}}+{\\frac {p^{2}q^{4}}{2}},}

where p is the generalized momentum and q is the `F33f`_`[generalized coordinate`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Generalized_coordinates]`_`f, a good canonical transformation to choose would be

This turns the Hamiltonian into

H = Q 2 2 + P 2 2 , {\\displaystyle H={\\frac {Q^{2}}{2}}+{\\frac {P^{2}}{2}},}

which is in the form of the harmonic oscillator Hamiltonian.

The generating function `*F`* for this transformation is of the third kind,

F = F 3 ( p , Q ) . {\\displaystyle F=F_{3}(p,Q).}

To find `*F`* explicitly, use the equation for its derivative from the table above,

P = − − ∂ ∂ F 3 ∂ ∂ Q , {\\displaystyle P=-{\\frac {\\partial F_{3}}{\\partial Q}},}

and substitute the expression for P from equation (`!`F33f`_`[1`#math-1]`_`f`!), expressed in terms of p and Q:

p Q 2 = − − ∂ ∂ F 3 ∂ ∂ Q {\\displaystyle {\\frac {p}{Q^{2}}}=-{\\frac {\\partial F_{3}}{\\partial Q}}}

Integrating this with respect to Q results in an equation for the generating function of the transformation given by equation (`!`F33f`_`[1`#math-1]`_`f`!):

F 3 ( p , Q ) = p Q {\\displaystyle F_{3}(p,Q)={\\frac {p}{Q}}}

To confirm that this is the correct generating function, verify that it matches (`!`F33f`_`[1`#math-1]`_`f`!):

q = − − ∂ ∂ F 3 ∂ ∂ p = − − 1 Q {\\displaystyle q=-{\\frac {\\partial F_{3}}{\\partial p}}={\\frac {-1}{Q}}}

>>See also

• `F33f`_`[Hamilton–Jacobi equation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Hamilton–Jacobi_equation]`_`f
• `F33f`_`[Poisson bracket`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Poisson_bracket]`_`f

>>References

`:cite-note-1`!1.`! `F0af`_`[↑`#cite-ref-1]`_`f `:citerefgoldsteinpoolesafko2001`aGoldstein, Herbert; Poole, C. P.; Safko, J. L. (2001). `*Classical Mechanics`* (3rd ed.). Addison-Wesley. p. 373. `F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ISBN_(identifier)]`_`f 978-0-201-65702-9.

`c`F0af`_`[↑ Back to top`#top]`_`f`a